﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MapGuideTest._Default" %>
<%@ Register assembly="OSGeo.MapGuide.Extensions" namespace="OSGeo.MapGuide.UI" tagprefix="OSGeo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>MapGuide Feature Source Test</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="grdFeatures" runat="server" DataSourceID="MgFeatureSource1" 
            AutoGenerateColumns="False"
            AllowPaging="true"
            AllowSorting="true"
            PageSize="50"
            CellPadding="4" ForeColor="#333333" GridLines="None" 
            DataKeyNames="Autogenerated_SDF_ID"
            EmptyDataText="(null)" onrowcommand="grdFeatures_RowCommand" 
            onrowdeleting="grdFeatures_RowDeleting" 
            onrowupdating="grdFeatures_RowUpdating" ondatabound="grdFeatures_DataBound">
            <PagerSettings Position="TopAndBottom" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField HeaderText="SDF ID" DataField="Autogenerated_SDF_ID" />
                <asp:BoundField HeaderText="Name" DataField="NAME" />
                <asp:BoundField HeaderText="ID" DataField="ID" />
                <asp:BoundField HeaderText="State" DataField="RSTATE" />
                <asp:BoundField HeaderText="Year" DataField="RYEAR" />
                <asp:BoundField HeaderText="# Units" DataField="NO_UNITS" />
                <asp:BoundField HeaderText="Last Sale" DataField="LAST_SALE" />
                <asp:BoundField HeaderText="Description" DataField="RLDESCR1" />
                <asp:BoundField HeaderText="Type" DataField="RTYPE" />
                <asp:CommandField ShowEditButton="True" />
                <asp:CommandField ShowSelectButton="True" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
    </div>
    <OSGeo:MgFeatureSource ID="MgFeatureSource1" runat="server" ClassName="Parcels" 
        FeatureSourceID="Library://Samples/Sheboygan/Data/Parcels.FeatureSource"
        DeleteEnabled="true" 
        SchemaName="Default">
    </OSGeo:MgFeatureSource>
    </form>
</body>
</html>
